﻿//-----------------------------------------------------------------------
// <copyright file="Expression.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Expression class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Markup;
    using Collections;

    /// <summary>
    /// Represents an expression within the runtime model.
    /// </summary>
    [ContentProperty("Arguments")]
    public class Expression : ElementBase
    {
        /// <summary>
        /// Initializes a new instance of the Expression class.
        /// </summary>
        public Expression()
        {
            this.Arguments = new Arguments();
        }

        /// <summary>
        /// Gets or sets the position of the production.
        /// </summary>
        public int Position { get; set; }

        /// <summary>
        /// Gets or sets the text value of the expression.
        /// </summary>
        /// <remarks>
        /// The text value provides a machine-readable representation of the expression that
        /// can be parsed by the model implementor component.
        /// </remarks>
        public string Text { get; set; }

        /// <summary>
        /// Gets the collection of arguments for this expression.
        /// </summary>
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public IList<Argument> Arguments { get; private set; }
    }
}
